#include "baudrate_dialog.h"
#include "ui_baudrate_dialog.h"
#include <QString>
#include <QMessageBox>
BaudRateDialog::BaudRateDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::BaudRateDialog)
{
    ui->setupUi(this);
    //设置标题
    this->setWindowTitle("设置波特率");
}

BaudRateDialog::~BaudRateDialog()
{
    //QMessageBox::information(this,"提示","BaudRateDialog对话框被删除");
    delete ui;
}

int BaudRateDialog::getBaudRate()
{//用于主窗口调用获得列数的输入值
    return  ui->comboBox->currentText().toInt();
}

void BaudRateDialog::setBaudRate(int baudRate )
{ //初始化数据显示
    ui->comboBox->setCurrentText(   QString::number(baudRate) );
}
